<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

// 前面都默认有个   /admin/xxx
Route::get('index', 'Index/index')->middleware(\app\middleware\Login::class);
Route::get('welcome', 'Index/welcome')->middleware(\app\middleware\Login::class);

Route::resource('swiper', 'Swiper')->middleware(\app\middleware\Login::class); // 资源路由
Route::post('swiper/upload','Swiper/upload')->middleware(\app\middleware\Login::class);
Route::get('swiper/get_swipers','Swiper/getSwipers')->middleware(\app\middleware\Login::class);
Route::get('swiper/is_show','Swiper/isShow')->middleware(\app\middleware\Login::class);

Route::resource('category', 'Category')->middleware(\app\middleware\Login::class); // 资源路由
Route::get('category/get_cats','category/getCats')->middleware(\app\middleware\Login::class);


Route::rule('login','Login/login','GET|POST');
Route::get('captcha','Login/captcha');
Route::get('logout','Login/logout');


